package com.qf.ssm.service.Impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.qf.ssm.mapper.AuditMapper;
import com.qf.ssm.entity.Audit;
import com.qf.ssm.service.AuditService;

import java.util.List;

@Service
public class AuditServiceImpl implements AuditService {

    @Resource
    private AuditMapper auditMapper;

    @Override
    public int deleteByPrimaryKey(Integer aId) {
        return auditMapper.deleteByPrimaryKey(aId);
    }

    @Override
    public int insert(Audit record) {
        return auditMapper.insert(record);
    }

    @Override
    public int insertSelective(Audit record) {
        return auditMapper.insertSelective(record);
    }

    @Override
    public Audit selectByPrimaryKey(Integer aId) {
        return auditMapper.selectByPrimaryKey(aId);
    }

    @Override
    public int updateByPrimaryKeySelective(Audit record) {
        return auditMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Audit record) {
        return auditMapper.updateByPrimaryKey(record);
    }


    @Override
    public int updateBatch(List<Audit> list) {
        return auditMapper.updateBatch(list);
    }

    @Override
    public int batchInsert(List<Audit> list) {
        return auditMapper.batchInsert(list);
    }

    /**
     * 数组批量删除
     * @param ids
     * @return
     */
    @Override
    public int updateList(int[] ids) {
        return auditMapper.updateList(ids);
    }

    /**
     * 集合批量删除
     * @param ids
     * @return
     */
    @Override
    public int updateListGather(List<Integer> ids) {
        return auditMapper.updateListGather(ids);
    }

    /**
     * 批量增加接口
     *
     * @param audits
     * @return
     */
    @Override
    public int insertList(List<Audit> audits) {
        return auditMapper.insertList(audits);
    }
}

